<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>flex-direction</title>
    <style type="text/css">
        /*
        flex-direction:row | row-reverse | column | column-reverse
        row（默认值）：主轴为水平方向，起点在左端。
        row-reverse：主轴为水平方向，起点在右端。
        column：主轴为垂直方向，起点在上沿。
        column-reverse：主轴为垂直方向，起点在下沿。
        */

        .unit{
            width: 80px;
            height:50px;
            background:orange;
            margin:10px;
        }
        .box{
            display: flex;
            flex-direction:row;
            border:1px solid #000;
            margin:10px;
            width: 500px;
            height:150px;
        }
        .box2{
            display: flex;
            flex-direction:row-reverse;
            border:1px solid #000;
            margin:10px;
            width: 500px;
            height:150px;
        }
        .box3{
            display: flex;
            flex-direction:column;
            border:1px solid #000;
            margin:10px;
            width: 100px;
            height:700px;
        }
        .box4{
            display: flex;
            flex-direction:column-reverse;
            border:1px solid #000;
            margin:10px;
            width: 100px;
            height:700px;
        }


    </style>
</head>
<body>
<div class="box">
    <div class="unit">1</div>
    <div class="unit">2</div>
    <div class="unit">3</div>
    <div class="unit">4</div>
    <div class="unit">5</div>
    <div class="unit">6</div>
    <div class="unit">7</div>
    <div class="unit">8</div>
    <div class="unit">9</div>
</div>
<div class="box2">
    <div class="unit">1</div>
    <div class="unit">2</div>
    <div class="unit">3</div>
    <div class="unit">4</div>
    <div class="unit">5</div>
    <div class="unit">6</div>
    <div class="unit">7</div>
    <div class="unit">8</div>
    <div class="unit">9</div>
</div>
<div class="box3">
    <div class="unit">1</div>
    <div class="unit">2</div>
    <div class="unit">3</div>
    <div class="unit">4</div>
    <div class="unit">5</div>
    <div class="unit">6</div>
    <div class="unit">7</div>
    <div class="unit">8</div>
    <div class="unit">9</div>
</div>
<div class="box4">
    <div class="unit">1</div>
    <div class="unit">2</div>
    <div class="unit">3</div>
    <div class="unit">4</div>
    <div class="unit">5</div>
    <div class="unit">6</div>
    <div class="unit">7</div>
    <div class="unit">8</div>
    <div class="unit">9</div>
</div>
</body>
</html>
